import { useGlobSetting } from '/@/hooks/setting';
const { uploadUrl } = useGlobSetting();

const VERSION = 'v1.0'; //版本号,后续可能会改变
const MCDUSER = 'mcduser'; //客户模块
const METERING = 'metering'; //水表模块
const ADMIN = 'admin'; //变量-admin
const METER = 'meter'; //变量-meter--水表
const CUSTOMER = 'customer'; //变量-customer-客户
const DICT = 'dict'; //数据字典
const BILLING = 'billing'; //用水类别
const CHARGE = 'charge'; //用水类别
const INSTALL = 'install'; //报装
const MESSAGE = 'message'; //消息
const SYS_ADMIN = 'sys/admin'; //系统管理
const APPROVAL = 'approval'; //消息
const REPORT = 'report'; //报表
const IMPORT = 'import'; // 远传表导入
const REMOTE = 'remote'; // 远传表异常处理
const READING = 'reading'; // 网关路径处理字段

// const ALTIMETER = '/altimeter';//高拍仪固定地址
const ALTIMETER= "http://127.0.0.1:38088/";

// var url = "http://127.0.0.1:38088/card=idcard";
export const ApiCommon: any = {
  USER_READERS_DICT : `/${VERSION}/${SYS_ADMIN}/user`, //表册管理抄表员
  CUSTOMER_API: `/${VERSION}/${MCDUSER}`, //客户模块
  // USER_READERS_DICT : `/${VERSION}/${SYS_ADMIN}/user`, //表册管理抄表员
  CUSTOMER_METER_API: `/${VERSION}/${CUSTOMER}/${METER}`, //管理后台--用户表
  SYS_ADMIN_API: `/${VERSION}/sys/${ADMIN}`, //系统管理
  CUSTOMER_ADMIN_API: `/${VERSION}/${CUSTOMER}/${ADMIN}`, //管理后台--人户表
  ADMIN_USER_DICT_API: `/${VERSION}/${CUSTOMER}/${DICT}`, //人户表数据字典集合
  READING_ADMIN_API: `/${VERSION}/reading/${ADMIN}`, //抄表模块
  METER_ADMIN_API: `/${VERSION}/${METERING}/${ADMIN}/${METER}`, //表册模块
  METER_ADMIN_DICT_API: `/${VERSION}/${METER}/${ADMIN}`, //全部水表
  BILLING_ADMIN_API: `/${VERSION}/${BILLING}/${ADMIN}`, //用水类别
  CHARGE_API: `/${VERSION}/${CHARGE}`, // 收费管理
  BANKWITHHOLD_API: `/${VERSION}`, //银行代扣
  PAPERINSTALL_API: `/${VERSION}/${INSTALL}`, //报装
  MESSAGE_ADMIN_API: `/${VERSION}/${MESSAGE}/${ADMIN}`, //报装
  UPLOAD_URL: uploadUrl, //上传专用,上传时需要加上这个前缀
  APPROVAL_URL: `/${VERSION}/${APPROVAL}/${ADMIN}`, // 业务办理baseurl
  REPORT_API:  `/${VERSION}/${REPORT}/${ADMIN}`, // 报表
  IMPORT_API:  `/${VERSION}/${READING}/${ADMIN}/${IMPORT}/${ADMIN}`, // 远传表导入
  REMOTE_API:  `/${VERSION}/${READING}/${ADMIN}/${REMOTE}/${ADMIN}`, // 远传表异常
  READING_BILLING_API : `/${VERSION}/${READING}/${ADMIN}`, //抄表计费
  ALTIMETER,
  WATER_API:`/${VERSION}/${METERING}/${ADMIN}`, //库存水表
  WATEA_METEING_API: `/${VERSION}/${CUSTOMER}/${METERING}/${ADMIN}` // 水表检定
};
